package com.panshi;


import com.panshi.domain.ZxComment;
import com.panshi.domain.vo.PageBean;
import com.panshi.domain.vo.ZxResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "hasbei-zx-service", path = "/api/comment", contextId = "IZxCommentApi")
public interface IZxCommentApi {
    @ApiOperation("新增评论")
    @PostMapping("/add")
    ZxResult addComment(@RequestBody ZxComment zxComment);

    @ApiOperation("评论点赞")
    @GetMapping("/Raise/{id}")
    ZxResult ZxCommentRaise(@PathVariable("id") Integer id);


    @ApiOperation("查询文章所有评论")
    @PostMapping("/getComment")
    ZxResult getComment(@RequestBody PageBean pageBean);


    @ApiOperation("查询文章所有评论回复")
    @PostMapping("/commentReply")
    ZxResult getCommentReply(@RequestBody PageBean pageBean);

    @ApiOperation("查询文章评论详情")
    @PostMapping("/getComment/{id}")
    ZxResult getCommentBayId(@PathVariable("id") Integer id);

}
